package com.neuedu.javase;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-09-21 16:40
 * 描述 : 算数运算
 */
public class Operator2 {
    public static void main(String[] args) {

        int numa = 10;
        int numb = 5;
        int numc = 6;
        double numd = 2.0;
        double nume = 3.0;

        System.out.println("numa = " + numa);
        System.out.println("numb = " + numb);
        System.out.println("numc = " + numc);
        System.out.println("numd = " + numd);


        System.out.println("numa + numb = " + (numa + numb));
        System.out.println("numa - numb = " + (numa - numb));
        System.out.println("numa * numb = " + (numa * numb));
        System.out.println("numa / numb = " + (numa / numb));
        System.out.println("numa % numb = " + (numa % numb));
        System.out.println("numa / numd = " + (numa / numd));  // 5.0 double
        System.out.println("numa / numc = " + (numa / numc));  // 1  int
        System.out.println("numa / nume = " + (numa / nume));  // 3.3333  double


        int myNuma = 5;
        System.out.println("myNuma = " + myNuma);
        myNuma++;
//        ++myNuma;
        System.out.println(" myNuma++ : "+( myNuma)); //6


//        int result1 = myNuma++;
        int result1 = ++myNuma;

        System.out.println(" result : "+ result1);




    }
}
